package is.progetto2.gui;

import java.util.LinkedList;
import java.util.List;

import is.progetto2.activity.BindType;

import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;

public class BindType2ListModel extends AbstractListModel<BindType> implements ComboBoxModel<BindType>{

	private static final long serialVersionUID = -4174591806233383404L;
	private List<BindType> list;
	private Object select;
	
	public BindType2ListModel(){
		list=new LinkedList<>();
		list.add(BindType.AFTER);
		list.add(BindType.FIRST);
	}

	@Override
	public BindType getElementAt(int arg0) {
		return list.get(arg0);
	}

	@Override
	public int getSize() {
		return list.size();
	}

	@Override
	public Object getSelectedItem() {
		return this.select;
	}

	@Override
	public void setSelectedItem(Object arg0) {
		this.select=arg0;
	}

}
